﻿using System.Data;

namespace TurtleEngine
{
	 /// <summary>
	 ///
	 /// </summary>
	 public class ViewColumnsHelper
	 {
		  /// <summary>
		  /// The view columns
		  /// </summary>
		  private static DataTable viewColumns = new DataTable("ViewColumns");

		  /// <summary>
		  /// Gets the view columns.
		  /// </summary>
		  /// <value>
		  /// The view columns.
		  /// </value>
		  public static DataTable ViewColumns
		  {
				get { return viewColumns; }
		  }

		  /// <summary>
		  /// Gets the view columns.
		  /// </summary>
		  public static void GetViewColumns()
		  {
				viewColumns.Clear();
				viewColumns = Utility.DBConnection.GetSchema("ViewColumns");

				//Utility.PrintDatatable(viewColumns);
		  }

		  /// <summary>
		  /// Writes the view columns.
		  /// </summary>
		  public static void WriteViewColumns()
		  {
				Utility.WriteXML(viewColumns, viewColumns.TableName + ".xml");

				//Utility.PrintDatatable(viewColumns);
		  }
	 }
}